﻿using OMG.Fill.Frunit.Model.Ent;
using OMG.Fill.Frunit.Services;
using ProjectShare;
using System.Collections.Generic;
using System.Web.Http;
namespace OMG.Fill.Frunit.Model.UI.Controllers
{
    public class GenerateLogController : ApiController
    {
        GenerateLogServices generateLogServices = new GenerateLogServices();
        
        //[ApiActionAuthorize("获取填报生成记录表T_GenerateLog分页列表对象操作")]
        //[ApiActionException]
        public Pager<List<GenerateLogModel>> PostPageList(GenerateLogQuery query)
        {
            return generateLogServices.GetPageList(query);
        }
        //[ApiActionAuthorize("新增填报生成记录表T_GenerateLog指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Post(GenerateLogEntity model) {
            return generateLogServices.AddInfo(model);
        }
        //[ApiActionAuthorize("修改填报生成记录表T_GenerateLog指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Put(GenerateLogEntity model)
        {
            return generateLogServices.UpdateInfo(model);
        }
        //[ApiActionAuthorize("删除填报生成记录表T_GenerateLog指定对象操作")]
        //[ApiActionException]
        public ResResult<int> Delete(string id)
        {
            return generateLogServices.DeleteInfo(id);
        }
        //[ApiActionAuthorize("获取填报生成记录表T_GenerateLog指定对象操作")]
        //[ApiActionException]
        public ResResult<GenerateLogEntity> Get(string id)
        {
            return generateLogServices.GetModel(id);
        }
        public ResResult<int> GetLocked(string id) {
            return generateLogServices.Locked(id);
        }
    }
}